Skip to content

Add initial devcontainer configuration#3771

Open
Tsukimarf wants to merge 235 commits intonvm-sh:xcode-selectfrom
Tsukimarf:patch-8
Open

Add initial devcontainer configuration#3771
Tsukimarf wants to merge 235 commits intonvm-sh:xcode-selectfrom
Tsukimarf:patch-8

Conversation

@Tsukimarf
Copy link

#3770 Use Ubuntu as base image

FROM mcr.microsoft.com/devcontainers/base:ubuntu

Install additional system packages

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive
&& apt-get -y install --no-install-recommends
build-essential
curl
git
vim
wget
&& apt-get autoremove -y
&& apt-get clean -y
&& rm -rf /var/lib/apt/lists/*

Set the default shell to bash

ENV SHELL=/bin/bash

ljharb and others added 30 commits January 18, 2022 12:49
If cd command fails, return whatever cd returned, instead of marching ahead
Fixes nvm-sh#2860.

This fixes these two linting errors:
- fqcn-builtins: Use FQCN for builtin actions.
- name: All names should start with an uppercase letter. (name[casing])
reducing `nvm ls-remote` from almost 20s to below 2s.

Signed-off-by: ryenus <ryenus@gmail.com>
- Update install directions to include `python3`, instead of `python2`, which is deprecated since Alpine 3.13.
Fixes nvm-sh#2743

Co-authored-by: Josh Kelley <joshkel@gmail.com>
Co-authored-by: Raz Luvaton <16746759+rluvaton@users.noreply.github.com>
Co-authored-by: Jordan Harband <ljharb@gmail.com>
My problem was that I didn't have EITHER file, and hopefully the notes will help someone else reading the docs.
Fixes nvm-sh#2914

Co-authored-by: epoweripione <siyuwuxin@gmail.com>
Co-authored-by: Jordan Harband <ljharb@gmail.com>
UlisesGascon and others added 28 commits September 15, 2025 14:33
The Debian WSL image has stale apt sources pointing to ftp.debian.org
which no longer hosts bullseye-backports. The previous fix ran sed
after the first setup-wsl call, but that call already failed because
additional-packages triggers apt-get update internally.

For wsl_matrix (Debian, Ubuntu):
- Ubuntu: install with additional-packages directly (no apt issue)
- Debian: install without packages first, fix sources.list with sed,
  then run apt-get update/upgrade/install manually with retries
- Exclude Debian and Ubuntu-20.04 --lts since node v24+ has exec
  format errors on WSL1

For wsl_matrix_unofficial (Alpine):
- Remove the Debian-specific fix entirely (Alpine uses apk, not apt)

See Vampire/setup-wsl#76
When `.nvmrc` or alias files contained comments (lines with `#`),
the `#` character could end up in the search pattern passed to sed,
causing "unterminated regular expression" errors because `#` is
used as the sed address delimiter.

This commit fixes the issue in two places:
1. `nvm_alias`: Strip comments from alias file contents before
   returning them, and trim trailing whitespace
2. `nvm_ls`: Escape `#` characters in SEARCH_PATTERN so they're
   treated as literal characters in the sed address

Fixes nvm-sh#3761
Previously, `nvm install Argon` would succeed by matching the LTS name
in the version description (e.g., "v4.9.1 (Latest LTS: Argon)"), but
`nvm uninstall Argon` would fail because "Argon" is not a valid alias or not a valid version.

Changes:
- Added pattern matching check in nvm_remote_version (nvm.sh:785-791)
- Skips check for implicit aliases (node, stable, etc.) to preserve
  existing functionality
- Added unit tests to verify LTS names are rejected while version
  numbers still work
After this fix:
- `nvm install Argon` → fails (use `nvm install lts/argon` instead)
- `nvm install 4` → still works
- `nvm install node` → still works
- `nvm install lts/argon` → still works

This makes install and uninstall behavior consistent.

Fixes nvm-sh#3474.
Old Node.js versions have Makefiles with unquoted glob patterns like
`rm -f *.o` that fail in zsh's strict glob mode. By passing
SHELL=/bin/sh to make, we ensure POSIX-compliant shell behavior
regardless of what shell nvm is running in.
Replace POSIX `[[:space:]]` character class with `[ \t]` for
mawk compatibility on Ubuntu 16.04.
nvm.sh uses `NVM_SCRIPT_SOURCE="$_"` to detect its source location.
Adding `: nvm.sh` before each source line ensures `$_` is set correctly, preventing breakage when the previous command (e.g., `set -ex`) overwrites it.
Move .github/copilot-instructions.md to AGENTS.md, and generalize the
wording, so it will apply to Codex CLI, Cursor, OpenCode, RooCode, and
many other AI coding agents.

Also add CLAUDE.md as a symlink to AGENTS.md so Claude Code reads the
same guidance.

Copilot coding agent now supports AGENTS.md custom instructions, as
more coding agents support it. Migrating from GitHub Copilot's custom
instructions file to AGENTS.md will help developers leverage more and
different coding agents than just GitHub Copilot.

Reference:
- https://agents.md/
- https://github.blog/changelog/2025-08-28-copilot-coding-agent-now-supports-agents-md-custom-instructions/
Normalize `nvm_version` output when `nvm_ls` returns "system vX" so alias and .nvmrc resolutions treat system correctly.

Add fast tests for system alias behavior in `nvm ls`, `nvm use`, and `nvm which`.
Include the requested version in the uninstall error output when

the target is not installed.

Add a fast test to lock the behavior.

Close nvm-sh#3767
@Tsukimarf Tsukimarf changed the base branch from master to nvmrc February 11, 2026 17:32
@Tsukimarf Tsukimarf changed the base branch from nvmrc to xcode-select February 11, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants